home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
zpont311.lha
/
zpoint-3.11
/
Rexx
/
ZPBM.zprx
< prev
next >
Wrap
Text File
|
1995-08-12
|
7KB
|
244 lines
/* $VER: ZPBM.zp 0.10 Beta von Frank Meister *
* AREXX Script für ZPBM ( Brettmanager für Zodiac's Point ) *
*******************************************************************/
/* Wo befindet sich ZPBM ? */
zpbm = 'dh1:tools/zpbm'
/*-----------------------------------------------------------------*/
/* Wo ist die Brettliste ?
( Vorher mit ZP auslagern ) */
list.zpbm = 'dh1:brettliste.zp'
/*-----------------------------------------------------------------*/
/* In diese Datei schreibt ZPBM die markierten
Bretter, um Sie dann per AREXX zu verarbeiten. */
maps.zpbm = 't:maps.zpbm'
/*-----------------------------------------------------------------*/
/* Unter diesem Namen wird die Brettliste, über der
der Nachrichtencursor in ZP steht, gespeichert.
Normalerweise hat man eine feste Brettliste, die
bei list.zpbm angegeben wird. */
templist.zpbm = 't:brettliste.zpbm'
/*-----------------------------------------------------------------*/
/* Unter diesem Namen wird eine List der in ZP
eingetragenen Bretter erstellt. */
zplist.zpbm = 't:boardlist.zpbm'
/*-----------------------------------------------------------------*/
/* Welche Sprache soll ZPBM Verwenden ?
'default' für Systemeinstellung */
language_zpbm = 'deutsch'
/*-----------------------------------------------------------------*/
/* Wie heißt der MAPS Ihres Servers ? */
maps_zpbm = 'MAPS'
/*-----------------------------------------------------------------*/
/* Welches Kommando erwartet Ihr MAPS um Bretter zu
bestellen ? */
mapsadd_zpbm = 'ADD'
/*-----------------------------------------------------------------*/
/* Welches Kommando erwartet Ihr MAPS um Bretter
abzubestellen ? */
mapsdel_zpbm = 'DEL'
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Bitte geben Sie hier ihre Präferenzen ein ! *
*******************************************************************/
/*******************************************************************
* Bitte unterhalb dieser Zeile nichts mehr verändern! *
*******************************************************************/
OPTIONS RESULTS
PARSE ARG zpPort
IF zpPort == '' THEN
zpPort = 'ZPoint'
ADDRESS VALUE zpPort
GUILOCK ON
WHICHLEVEL
LEVEL=RESULT
IF (RESULT = 'BOARD') THEN
DO
BOARDINFO LABEL
BOARDNAME=RESULT
MESSAGEINFO SUBJECT
IF(VERIFY('LISTBRETTER',RESULT)=0) THEN
DO
SAVEMESSAGEBODY templist.zpbm
list.zpbm = templist.zpbm
MESSAGEINFO AUTHOR
maps_zpbm = RESULT
END
END
ELSE
DO
IF(RESULT = 'BOARDMENU') THEN
DO
BOARDINFO LABEL
BOARDLABEL=RESULT
END
END
CALL CREATELIST
ADDRESS COMMAND zpbm 'PUBSCREEN='zpPort' LIST='list.zpbm'
ZPLIST='zplist.zpbm'
MAPS='maps.zpbm' LANGUAGE='language_zpbm''
HELP=RC
BIN=HELP
/* Create */
IF(BITAND(C2B(BIN),C2B(8))=C2B(8)) THEN
CALL CREATEBOARDS
BIN=HELP
/* Delete */
IF(BITAND(C2B(BIN),C2B(4))=C2B(4)) THEN
CALL DELETEBOARDS
BIN=HELP
/* DeRequest */
IF(BITAND(C2B(BIN),C2B(2))=C2B(2)) THEN
DO
CALL BOARD
WRITEMESSAGE maps.zpbm maps_zpbm mapsdel_zpbm
END
BIN=HELP
/* Request */
IF(BITAND(C2B(BIN),C2B(1))=C2B(1)) THEN
DO
CALL BOARD
WRITEMESSAGE maps.zpbm maps_zpbm mapsadd_zpbm
END
IF(EXISTS(templist.zpbm)) THEN
ADDRESS COMMAND DELETE templist.zpbm QUIET
IF(EXISTS(maps.zpbm)) THEN
ADDRESS COMMAND DELETE maps.zpbm QUIET
IF(EXISTS(zplist.zpbm)) THEN
ADDRESS COMMAND DELETE zplist.zpbm QUIET
WHICHLEVEL
IF(LEVEL = 'BOARD') THEN
DO
IF(RESULT = 'BOARD') THEN
DO
BOARDINFO LABEL
IF(RESULT ~= BOARDNAME) THEN
DO
BOARDMENU
JUMPTOBOARD 1
JUMPTOBOARD 'NAME' BOARDNAME
ENTERBOARD
END
END
ELSE
DO
JUMPTOBOARD 1
JUMPTOBOARD 'NAME' BOARDNAME
ENTERBOARD
END
END
ELSE
DO
CALL BOARDMENU
IF(LEVEL = 'BOARDMENU') THEN
DO
JUMPTOBOARD 1
JUMPTOBOARD 'NAME' BOARDLABEL
END
IF(LEVEL = 'MAINMENU') THEN
MAINMENU
END
GUILOCK OFF
EXIT /* Programmende */
/********************************************************************
* PROCEDURE CREATELIST *
********************************************************************/
CREATELIST:
CALL BOARDMENU
JUMPTOBOARD 2
IF OPEN(FILE, zplist.zpbm, 'W') THEN
DO
DOWN
DO WHILE(RC)
BOARDINFO LABEL
NIL=WRITELN(FILE,RESULT)
DOWN
END
NIL=CLOSE(FILE)
END
RETURN
/********************************************************************
* PROCEDURE DELETEBOARDS *
********************************************************************/
DELETEBOARDS:
CALL BOARDMENU
JUMPTOBOARD 3
IF OPEN(FILE, maps.zpbm, 'R') THEN
DO
DO UNTIL EOF(FILE)
LINE=READLN(FILE)
IF COMPARE(LINE,'') THEN
DO
IF ~ABBREV(LINE,'/') THEN
LINE=INSERT('/',LINE)
JUMPTOBOARD 'NAME' LINE
IF(RC) THEN
DELETE
END
END
NIL=CLOSE(FILE)
END
RETURN
/********************************************************************
* PROCEDURE CREATEBOARDS *
********************************************************************/
CREATEBOARDS:
/* ------------- Diese Funktion läuft erst ab V37.197 ------------- */
VERSION.No = "37.197 (7.8.95)"
WHICHVERSION
IF RESULT < VERSION.No THEN DO
REQUESTNOTIFY "Einrichten ist er ab Zodiac's Point" VERSION.no "möglich!"
RETURN
END
HOMEPATH
HeimatPfad = RESULT
IF OPEN(FILE, maps.zpbm, 'R') THEN
DO
DO UNTIL EOF(FILE)
NEWBOARDNAME=READLN(FILE)
IF LINE ~= "" THEN CREATEBOARD newboardname Heimatpfad||newboardname
END
NIL=CLOSE(FILE)
END
RETURN
/********************************************************************
* PROCEDURE BOARDMENU *
********************************************************************/
BOARDMENU:
WHICHLEVEL
IF (RESULT ~= 'BOARDMENU') THEN
BOARDMENU
RETURN
/********************************************************************
* PROCEDURE BOARD *
********************************************************************/
BOARD:
WHICHLEVEL
IF (RESULT ~= 'BOARD') THEN
DO
IF (RESULT = 'MAINMENU') THEN
BOARDMENU
JUMPTOBOARD 1
ENTERBOARD
END
RETURN